import request from '@/utils/request'

export default {
    searchEmp(pageNum, pageSize, keyWord) {
        return request({
            url: `/emp/search/${pageNum}/${pageSize}`,
            method: 'post',
            data: keyWord
        })
    },

    findEmpById(eid) {
        return request({
            url: `/emp/getById/${eid}`,
            method: 'get'
        })
    },

    addEmp(emp) {
        return request({
            url: `/emp/add`,
            method: 'post',
            data: emp
        })
    },

    updateEmp(emp) {
        return request({
            url: `/emp/update`,
            method: 'put',
            data: emp
        })
    },

    removeEmps(eids) {
        return request({
            url: `/emp/remove`,
            method: 'delete',
            data: eids
        })
    }
}